home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / System7 tools / T / TrashMan3.1.2.cpt / TrashMan / TrashMan 3.1.2 Docs next >
Text File  |  1992-01-28  |  18KB  |  179 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8. **TrashMan is ©1991 by Dan Walkowski.  I retain all rights to this software.  It may not be included in any ShareWare 'packages' without my express written consent.  (This means you, EduCorp).  TrashMan may be given/transmitted/mailed and otherwise distributed freely, as long as no fee is charged, and as long as this document accompanies it.**
  9.  
  10. I have authorized TelePrint Systems to distribute TrashMan and my other software as part of a free package of ShareWare included on their electronic catalog disks.
  11.  
  12. NOTE:
  13. TrashMan is NOT free.  TrashMan is ShareWare.  TrashMan will make your system 7 trashcan behave the way it ought to, and might save you hours of lost work.  Isn’t that worth a few bucks?
  14. If you use it, please send $5.00 to:
  15.  
  16.           Dan Walkowski
  17.           212 E. Gregory #102
  18.           Champaign, IL  61820
  19.  
  20.           email:  walkowsk@cs.uiuc.edu
  21.  
  22. In addition, if you have some sort of Net access, (GEnie, InterNet, BitNet, CompuServe, AOL, etc.), please send along your address, so that I can get in touch with you if necessary.
  23.  
  24. Paying your registration fee will entitle you to use all possible future versions of TrashMan freely. (Not to mention that your feature requests will receive higher priority)
  25.  
  26. FIRST AND FOREMOST:
  27. I would like to extend my most sincere thanks to the following people:
  28. Roger & Judith Bier, Daniel Ligas, Mark & Paula Sundstrom, Murphy Sewall, Jim Ratliff, Michael Crichton, Mr. & Mrs. Thomas Holt, Karl Bunker, James & Brunhilde Nance, Daniel Paight, J. Marshall & Patrice Evans, Shigekazu Tsukegi, J. Ernest & Bonnie Cooper, John Christianson, Ranier Fuchs, Earle Alexander, Richard Gore, Paul Durrant, Jerome Wilcox, Josh Lubell, Norman Chiu, Dave Matthews, G. Stewart Beal, Jeffry Jondahl, Michael Ferguson, Michael Kelly, Keith Gibson, Steve Mitchell, Mark Thompson, Roy Green, Ian Chai, Johnson & Johnson Designers, and some kind person at Simon Fraser University, who registered 2 copies.
  29.  
  30. These are the people who have paid their ShareWare fee.  Since the list is growing, I will move it to the end of the docs in the future.
  31.  
  32. TrashMan is straightforward and easy to use because I made it that way.   Although it looks simple, it is 1120 lines of code at last count.  Please give me an incentive to keep writing useful software by registering your copy of TrashMan.  Is $5 that much to ask?
  33.  
  34. Ÿ If you like TrashMan (or even if you don't), try my other software (all of it free):
  35.    • After Dark modules: Swarm, Bacteria, Screaming Bjarne, and PowerDown. (PD is 7-only)
  36.    • 'Note...' a sticky-yellow-note application. (Version 1.2 available soon)
  37.  
  38.       ---------------------------
  39. •• Because of increasing length, the VERSION HISTORY has been moved to the end of this document.  It will continue to be in that location in future documentation.
  40.       ---------------------------
  41.  
  42. •!!• Note: If you have ever used a version of TrashMan earlier than 3.0, you must rebuild the Desktop for the drag-drop features to work.  This is the Finder's fault, not TrashMan's.  To rebuild the Desktop, hold down the command and option keys on startup, until you get the confirming dialog box.
  43.  
  44. WHAT IS TRASHMAN?
  45. • TrashMan is a system enhancement designed for System 7 and beyond.  (TrashMan will not work with System Software prior to 7.0)
  46. •TrashMan is like an electronic compost heap, deleting files from your trash after they have 'aged' beyond a setpoint that you specify, in days and hours.  TrashMan works with all mounted volumes, including AppleShare.  (Don't panic, AppleShare servers keep separate trash directories for each user).  
  47. •TrashMan empties the trash of any volume that is dropped on it, acting like a selective 'Empty Trash' command.
  48. • If you use TrashMan, you need never choose ‘Empty Trash’ from the ‘Special’ menu ever again, and yet still receive the benefits of the new non-emptying trash in System 7.0.
  49.  
  50.  
  51. WHY WOULD I WANT TO USE TRASHMAN?
  52.     The trash can on the desktop is a wonderful idea, except that I find myself doing something that I’m sure many of you do also:  I drop something in the Trash, and then immediately go to the Special menu and choose ‘Empty Trash’.  Why?  Because I, like many of you, run at near capacity on my hard disks, and want always to have as much free space as possible.
  53.     The new trash can in System 7.0 is a much improved version of its ancestors, but introduces new problems.  It is wonderful that the Trash no longer empties unexpectedly, but now if you don’t choose ‘Empty Trash’ periodically, it will accumulate many files, wasting valuable disk space.  So what happens?  I choose ‘Empty Trash’ more often!  Although this isn’t bad, it negates the reason that the new non-emptying Trash was developed:  so that when you throw something in accidentally, you can retrieve it later! 
  54.     It seems to me that what is really needed is an automatically emptying Trash.  However, if it just empties everything every time you run it, it is no more useful than  ‘Empty Trash’.  (Offerings from other people, which either empty it all on startup, or, even more extremely, empty it every 10 seconds or so (!) don’t satisfy me.)  What I think is really needed is a ‘Smart’ trash.  One that doesn’t throw away everything in the trash, just the files that have been there a ‘long’ time.  (And I want to be able to decide what ‘long’ means.)  After over 23 years of painstaking research, I have developed TrashMan.  (Well, OK, it wasn’t quite that long).
  55.  
  56.  
  57. HOW DO I USE TRASHMAN?
  58.     PLACE TRASHMAN IN THE 'STARTUP ITEMS' FOLDER IN YOUR SYSTEM FOLDER.
  59.     ADDITIONALLY, IF YOU WISH TO USE THE DRAG-DROP FEATURE, PLACE AN ALIAS OF TRASHMAN ON YOUR DESKTOP.
  60.     Simply put, TrashMan occasionally looks in your trash, examines the files within, and deletes files that have been there for a 'long' time.  (hereafter called 'expired files')  You decide how often TrashMan checks, and also how old files can become before being deleted.  This process of examining files in the trash and deleting expired ones  is called 'scanning'.
  61.     TrashMan uses very little RAM, and is configured to be an extremely, EXTREMELY low-priority process, because my intention is for TrashMan to have as little effect on the performance of your Mac as possible.  However, in a futile attempt to please everyone, TrashMan has two modes of operation:
  62.     The first mode, called 'Scan once at Startup', means that TrashMan will scan the trash when your machine is started up (or restarted) and then it will quit, thereby freeing what little RAM (and CPU time) it uses.  Additionally, when volumes are dropped on TrashMan, it will start up, empty the trash on those volumes, and then quit.
  63.     The second mode, called 'Run in Background', means that TrashMan will run continuously, scanning the trash every few minutes. (adjustable by you)  Obviously, disks may also be dropped on TrashMan when it is in this mode, and it will empty the trash on those volumes.
  64.  
  65. [Exercise: use one of the oodles of little process-monitoring apps to see for yourself how little CPU time TrashMan uses when in the background.]
  66.  
  67.     TrashMan has one dialog box, in which you configure all of its settings, but the method of arriving at this dialog box differs depending on what mode TrashMan is in.  If TrashMan is in 'Run in Background' mode, then simply bring the TrashMan program to the front using the Application menu, (or the task-switching software of your choice), and choose 'Options...' from the File menu.  However, if TrashMan is in 'Scan once at Startup' mode, this will not be possible, since it will run and quit very quickly.  TO CONFIGURE TRASHMAN WHEN IT IS IN 'SCAN ONCE AT STARTUP' MODE, HOLD DOWN THE OPTION KEY AND DOUBLE-CLICK ON THE TRASHMAN ICON.
  68.  
  69.     Once you have arrived at the options dialog box, you are presented with several controls:
  70.  
  71.     The two radio buttons at the top switch between 'Scan once at Startup' and 'Run in Background' modes.
  72.  
  73.     The 'Scanning every: __ minutes' control adjusts how frequently TrashMan scans the trash when it is in 'Run in Background' mode.
  74.  
  75. The 'Sounds when Scanning' checkbox tells TrashMan whether or not you'd like audio feedback.
  76.  
  77.     The 'Delete Trash older than: __ days and __ hours' control adjusts how long TrashMan will allow files to stay in the trash before considering them 'expired' and deleting them.
  78.  
  79.     The 'Always delete Applications' checkbox tells TrashMan to always consider applications expired, no matter how little time they've been in the trash.
  80.     (I added this since programs are large and can be easily replaced, but documents I'm working on cannot.)
  81.  
  82.     When you are done configuring TrashMan, click the 'ok' button.  To cancel any changes to the settings you may have made, click the 'cancel' button.
  83.  
  84.     **(Note that the very first time TrashMan scans, it will not delete any files, since it doesn’t know how long they have been in the trash.  In other words, if you have TrashMan set to 5 days, you will not see any files being deleted from your trash until 5 days after you start using TrashMan.  However, realize that if you set TrashMan to 0 days and 0 hours, it will delete ALL files in the trash every time it scans.)
  85.  
  86.        COMMON QUESTIONS ABOUT TRASHMAN
  87.         --------------------------------
  88. WILL TRASHMAN FIND THE TRASH IF I HAVE RENAMED IT TO SOMETHING ELSE?
  89.     (You mean like 'Ninth Circle of Hell'?)
  90.     YES.
  91.  
  92. WILL TRASHMAN EVER DELETE FILES SOONER THAN I EXPECT?
  93.     NO.
  94.  
  95. COULD TRASHMAN SOMEHOW DELETE FILES THAT ARE NOT IN THE TRASH?
  96. ABSOLUTELY NOT.  
  97.  
  98. MIGHT TRASHMAN DELETE SOMEONE ELSE'S FILES FROM A FILESERVER?
  99.     NO, running TrashMan on your local machine can never delete other people's files from a server.  However, if TrashMan is running on the server itself, it then can delete any or all files in the trash on the server. (see below)
  100.  
  101. WHEN MIGHT TRASHMAN NOT WORK?
  102.     TrashMan never works on Sundays or Holidays.  (just kidding)
  103.     You MUST be running System 7 to use TrashMan.
  104.     Unusual external file systems might not work with TrashMan. 
  105.  
  106. WOULD TRASHMAN WORK WELL ON A SERVER?
  107.     YES YES!!  TrashMan would be ideal to use on a fileserver, because it would limit how long users could let files accumulate in their trash, wasting space on the server.
  108.  
  109. FEATURES PLANNED FOR VERSION 4.0
  110. • Asynchronous background operation.  This will be especially nice for people with slower machines, who don't like to have their mac pause while a scan takes place.
  111. • Faceless background app with configuration program.  The TrashMan engine will be split off into a faceless background application, thereby using less RAM, and not appearing on the app menu.  A small configuration program will be provided to change the settings.  (It will look very similar to how the options dialog looks now, to reduce confusion.)  The configuration program will communicate with the background engine via Apple Events.
  112. • Volume unmounting.  By holding down the option key, volumes dropped on TrashMan will have their trash emptied and then be ejected, thus saving a step when emptying a floppy.
  113. • Even more Apple Event support, perhaps including Frontier hooks for scripting capability.
  114.  
  115. POSSIBLE FUTURE ENHANCEMENTS
  116. • Option to set a 'minimum free space', such that TrashMan never lets the free space on a volume go below this value?   (This was going to be included in 3.x, but I haven't worked out the interface details yet.  I want TM to be simple, yet for this to be done properly, you would like to be able to set it for each volume.  That means scrolling lists of volumes, pop-up menus, sliders, etc.  Ugh.  Also, it would mean a large increase in the memory partition TM needs to run in, since it cannot decide whether or not to delete a file in a single traversal of the directory.  It would have to create a list of all the files in the trash, and then sort them by age, and then keep deleting the oldest ones until the freespace went above the line again.  I know that I wouldn't even want to run TM if it needed 200K.)
  117.  
  118. • Fixed times for trash deletion? (for example: empty the trash every Tuesday and Thursday at 9:00 am)
  119.  
  120.  
  121. HOW DOES TRASHMAN WORK?
  122.     When TrashMan scans the trash, it 'time stamps' all files it has not seen before by writing a time code in their 'Get Info' comment fields.  Then it unlocks and deletes any files that have expired time stamps.
  123.     This means that you will lose any comments that you have attached to files when you throw them in the trash.  I didn't think this would be a big deal, since we are all used to losing the darn things every time we rebuild the desktop anyway.
  124.  
  125. ACKNOWLEDGMENTS
  126.     Thanks to Steve Dorner, of Eudora fame, for helpful feedback and a few invaluable bits of code.  Thanks also to Bill Walker, Eric Gold, Pat McClaughry, John Brewer, and Amit Parghi, for believing me when I said "Trust me, it works!".  Even more thanks to Smittie, for being my contact to the pay-per-view nets.
  127.  
  128.  
  129. DISCLAIMER
  130. (Sorry about this, but I have to C.M.A.)
  131.     Although TrashMan has been tested heavily and no problems have been found, I do not have the resources (or the time) to test it under every conceivable condition.  (For example, unusual external file systems.)
  132.     This means that you use TrashMan ‘as-is’, and at your own risk.  I TAKE NO RESPONSIBILITY FOR ANY LOSS OF DATA THAT MIGHT OCCUR, and by using this software, you agree to these conditions.
  133.  
  134.  
  135. Public Service Announcement:
  136. TrashMan doesn't throw away your files.  It recycles them.
  137.  
  138. DAW 91
  139.       ---------------------------
  140.                VERSION HISTORY
  141.       ---------------------------
  142. Version 3.1.2
  143. Changes:
  144. • I made the assumption that scanning was always good, since it time-stamps things.  A helpful user in Sweden showed me the error of my ways.  When the delete time is set to 0, and TM is used in 'Scan once' mode, dropping a disk starts up TM, which did a scan of all mounted volumes, and THEN handled the Apple Event.  Since the age limit was 0, a scan is the same as an empty.  I've now changed the loop:  Apple Events are handled first, and if it was a drop, no scan is done.
  145.       ---------------------------
  146. Version 3.1.1
  147. Bugs Fixed:
  148. • Made a stupid mistake in TM31, causing it to crash in 32-bit mode.  Fixed.  Sorry folks.
  149.       ---------------------------
  150. Version 3.1
  151. Bugs Fixed:
  152. • Drag-Drop of volumes didn't work when TM was in 'Run once at Startup' mode.  It scanned the volume instead of erasing all of its trash.  Fixed.
  153. • TM 3.0 had some problems on the 'little' macs.  This was due to a stack sizing problem, and could be fixed by simply increasing the 'Get Info' memory partition 10K.   (Technically: 'big' macs have a larger default stack size, so when TM started up, the stack was already large enough.  Little macs have a smaller default stack size, so the stack was increased at startup time, 'stealing' some away from the heap, thereby leaving TM not enough to work with in some situations.)  All I've done is make the partition a bit larger in this version.  If you have a big mac, but are pressed for memory, you can probably trim off 10-15K if you like.   (But beware...)
  154.  
  155. NEW FEATURES:
  156. •• Sounds.  Several users mentioned that they were occasionally startled when their machine paused for a second, and then realized that it was TM scanning.  One person suggested that TM might momentarily change the cursor to a tiny trashcan while scanning.  At first I thought this might be a good idea, but then realized that not only was this improper UI technique, but nearly impossible to do while in the background.
  157. So instead, I have added sounds.  TM will make a low tone when it starts to scan, then a high tone for each volume it scans, then another low tone when it finishes scanning.  These are extremely soft and quick sounds, so as not to be annoying.  TM will also make a tone for each volume dropped on it in the Finder.  Sound/No Sound is controlled from the options dialog.
  158.  
  159. NEW NOT-IMPORTANT-ENOUGH-TO-BE-CALLED-FEATURES-BUT-STILL-NICE-THINGS:
  160. •• When dropping volumes on TM, TM now brings the Finder back to the front after emptying their trash.  Seems trivial, doesn't it?  However, it is much quicker and nicer to use now.
  161. •• John Brewer pointed out a few places where I might write even more defensive code, and do a bit more error checking.  Taking his advice, I have.  TM should exit gracefully now from many typical kinds of errors.
  162.       ---------------------------
  163.  
  164. Version 3.0
  165. NEW FEATURES! :
  166. •• TrashMan no longer modifies the creation or modification dates of files.
  167. •• TrashMan now runs via AppleEvents! :
  168.          To empty the Trash on a particular volume, drop the volume icon onto TrashMan.  (Or an alias of TrashMan).  ALL the trash on that volume (not just the expired files) will be deleted.  You can think of this feature as a selective 'Empty Trash' command.  It works with any volume, but is specifically targeted at the "How do I clear off a floppy without disturbing the trash on my hard disk?" problem.
  169.          In addition, now that TrashMan implements the default AppleEvents, it starts up, shuts down, and switches to the background slightly faster.
  170.  
  171. [Note: because of an inconsistency in the Finder, you are also allowed to drop folders on TrashMan.  This is exactly equivalent to dropping that folder's volume onto TrashMan,  ie: it empties the trash of that volume]
  172.  
  173. [TechNote: You can have TrashMan empty the trash on a list of volumes by sending it the standard 'odoc' AppleEvent with a list of alias records for the volumes.]
  174.  
  175. NEW NON-FEATURES:
  176. • TrashMan can no longer time stamp files on floppy disks, since they do not use the new Desktop Manager.  Note that trash on floppies can now be erased by the drag-drop method mentioned above.
  177.  
  178.       -----------------------------
  179. (The end)